home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / rayshade / libshade / viewing.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  2KB  |  57 lines

  1. /*
  2.  * viewing.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * $Id: viewing.h,v 4.0 91/07/17 14:48:26 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    viewing.h,v $
  19.  * Revision 4.0  91/07/17  14:48:26  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23. #ifndef VIEWING_H
  24. #define VIEWING_H
  25.  
  26. /*
  27.  * Screen
  28.  */
  29. typedef struct RSScreen {
  30.     int    xres, yres,        /* Resolution of entire screen */
  31.         xsize, ysize,        /* Resolution of window */
  32.         minx, miny, maxx, maxy; /* Window to be rendered */
  33.     Vector    scrnx, scrny,        /* Horizontal & vertical screen axes */
  34.         scrni, scrnj,        /* Normalized versions of the above */
  35.         firstray;        /* Direction from eye to screen UL  */
  36.     Color    background;        /* Background color */
  37. } RSScreen;
  38.  
  39. /*
  40.  * Camera
  41.  */
  42. typedef struct {
  43.     Vector    pos,            /* Eye position */
  44.         lookp,            /* Look position */
  45.         dir,            /* Look direction */
  46.         up;            /* 'Up' vector */
  47.     Float    hfov, vfov,        /* Horizontal/vertical field of view */
  48.         lookdist,        /* Eye pos/look pos distance */
  49.         aperture,        /* Aperture width (0 == pinhole) */
  50.         focaldist;        /* Distance from eye to focal plane */
  51. } RSCamera;
  52.  
  53. extern RSScreen Screen;
  54. extern RSCamera Camera;
  55.  
  56. #endif /* VIEWING_H */
  57.